/*
 * Copyright (C) 2014 Steven Kurilovitch
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.goodjaerb.swccg.core.filter;

import com.goodjaerb.swccg.core.CardData;

/**
 * 
 * @author Steven Kurilovitch
 */
public enum FilterField {
    NONE(null, CompareType.NONE, ""),
    POWER(CardData.Field.POWER, CompareType.NUMERIC, "Power"),
    ABILITY(CardData.Field.ABILITY, CompareType.NUMERIC, "Ability"),
    DEFENSE_LABEL(CardData.Field.DEFENSE_LABEL, CompareType.CHARACTER, "Defense Label"),
    DEFENSE(CardData.Field.DEFENSE, CompareType.NUMERIC, "Defense"),
    SPEED_LABEL(CardData.Field.SPEED_LABEL, CompareType.CHARACTER, "Speed Label"),
    SPEED(CardData.Field.SPEED, CompareType.NUMERIC, "Speed"),
    PARSEC(CardData.Field.PARSEC, CompareType.NUMERIC, "Parsec"), 
    DEPLOY(CardData.Field.DEPLOY, CompareType.NUMERIC, "Deploy"),
    FORFEIT(CardData.Field.FORFEIT, CompareType.NUMERIC, "Forfeit"),
    POLITICS(CardData.Field.POLITICS, CompareType.NUMERIC, "Politics"),
    SET(CardData.Field.SET, CompareType.DO_NOT_USE, "Set"),
    LEGACY_SET(CardData.Field.SET, CompareType.DO_NOT_USE, "Legacy Set"),
    TYPE(CardData.Field.TYPE, CompareType.DO_NOT_USE, "Type"),
    DESTINY(CardData.Field.DESTINY, CompareType.NUMERIC, "Destiny"),
    SUBTYPE(CardData.Field.SUBTYPE, CompareType.DO_NOT_USE, "Subtype"),
    CHARACTER_SUBTYPE(CardData.Field.CHARACTER_SUBTYPE, CompareType.CHARACTER, "Character Subtype"),
    VEHICLE_SUBTYPE(CardData.Field.VEHICLE_SUBTYPE, CompareType.CHARACTER, "Vehicle Subtype"), 
    SQUADRON_SUBTYPE(CardData.Field.SQUADRON_SUBTYPE, CompareType.CHARACTER, "Squadron Subtype"),
    CAPITAL_SUBTYPE(CardData.Field.CAPITAL_SUBTYPE, CompareType.CHARACTER, "Capital Subtype"),
    STARFIGHTER_SUBTYPE(CardData.Field.STARFIGHTER_SUBTYPE, CompareType.CHARACTER, "Starfighter Subtype");
    
    private final CardData.Field field;
    private final CompareType ct;
    private final String displayString;
    
    private FilterField(CardData.Field field, CompareType ct, String displayString) {
        this.field = field;
        this.ct = ct;
        this.displayString = displayString;
    }
    
    public CardData.Field getDataField() {
        return field;
    }
    
    public CompareType getCompareType() {
        return ct;
    }

    @Override
    public String toString() {
        return displayString;
    }
    
    public enum CompareType {
        NUMERIC, CHARACTER, DO_NOT_USE, NONE;
    }
}
